<form gnForm [formGroup]="form.formGroup">
  <gn-form-field title="必须输入" field="field1"
                 [validators]="[{message: '必须输入', name: 'required', validatorFn: form.validators.required}]">
    <input formControlName="field1" type="text" pInputText>
  </gn-form-field>
  <gn-form-field title="必须输入" field="field2"
                 [validators]="[{message: '必须输入', name: 'required', validatorFn: form.validators.required}]">
    <input formControlName="field2" type="text" pInputText>
  </gn-form-field>
  <gn-form-button (onClick)="confirm()"></gn-form-button>
  <gn-form-button></gn-form-button>
</form>

